<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'Date') ?>
<?php use_stylesheet('/sf/sf_admin/css/main') ?>
<h1><?php echo __('Edit user info') ?></h1>
<?php echo form_tag('user/save'); ?>
<?php echo input_hidden_tag('id', $user->getId()) ?>
<?php echo input_hidden_tag('profile', 1);?>
<div id="sf_admin_container">
<div id="sf_admin_content">
<?php if ($sf_flash->has('notice')): ?>
    <div class="save-ok">
        <h2><?php echo __($sf_flash->get('notice')) ?></h2>
    </div>
<?php endif; ?>
<fieldset id="sf_fieldset_none" class="">
<div class="form-row">
  <?php echo label_for('user[nick]', __($labels['user{nick}']), '') ?>
  <div class="content<?php if ($sf_request->hasError('user[nick]')): ?> form-error<?php endif; ?>">
  <?php if ($sf_request->hasError('user[nick]')): ?>
    <div class="content form-error" style="padding-left:0px" id="error_for_nick">
    ↓    <?php echo __($sf_request->getError('user[nick]')); ?>↓
    </div>
  <?php endif; ?>

  <?php $value = object_input_tag($user, 'getNick', array (
  'size' => 40,
  'control_name' => 'user[nick]',
)); echo $value ? $value : '&nbsp;' ?>
    </div>
</div>

<div class="form-row">
  <?php echo label_for('user[email]', __($labels['user{email}']), '') ?>
  <div class="content<?php if ($sf_request->hasError('user[email]')): ?> form-error<?php endif; ?>">
  <?php if ($sf_request->hasError('user[email]')): ?>
    <div class="content form-error" id="error_for_email" style="padding-left:0px">
    ↓    <?php echo __($sf_request->getError('user[email]')); ?>↓
    </div>
  <?php endif; ?>

  <?php $value = object_input_tag($user, 'getEmail', array (
  'size' => 40,
  'control_name' => 'user[email]',
)); echo $value ? $value : '&nbsp;' ?>
    </div>
</div>
<div class="form-row">
<?php echo label_for('user[old_password]', __($labels['user{old_password}']), '') ?>
<div class="content<?php if ($sf_request->hasError('old_password')): ?> form-error<?php endif; ?>">
    <?php if ($sf_request->hasError('old_password')): ?>
        <?php echo form_error('old_password', array('class' => 'form-error-msg')) ?>
    <?php endif; ?>
    <?php echo input_password_tag('user[old_password]'); ?>
</div>
<br />
<?php echo label_for('user[new_password]', __($labels['user{new_password}']), '') ?>
<div class="content<?php if ($sf_request->hasError('new_password')): ?> form-error<?php endif; ?>">
    <?php if ($sf_request->hasError('new_password')): ?>
        <?php echo form_error('new_password', array('class' => 'form-error-msg')) ?>
    <?php endif; ?>

    <?php echo input_password_tag('user[new_password]'); ?>
</div>
<br />
<?php echo label_for('user[newrepeat_password]', __($labels['user{newrepeat_password}']), '') ?>
<div class="content<?php if ($sf_request->hasError('newrepeat_password')): ?> form-error<?php endif; ?>">
    <?php if ($sf_request->hasError('newrepeat_password')): ?>
        <?php echo form_error('newrepeat_password', array('class' => 'form-error-msg')) ?>
    <?php endif; ?>
    <?php echo input_password_tag('user[newrepeat_password]'); ?>
</div>
</div>
</fieldset>
<br />
<ul class="sf_admin_actions">
<li>
  <?php echo submit_tag(__('save'), array (
  'name' => 'save',
  'class' => 'sf_admin_action_save'
)) ?></li>
</ul>

</form>
</div>
</div>